//
// Created by zx208 on 2024/10/16.
//

#include "../../define.h"
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>

#ifndef _SingleLinkedList_H
#define _SingleLinkedList_H

typedef int ElemType;

typedef struct LNode{
    ElemType data;
    struct LNode *next;
} LNode, *LinkedList;

LinkedList Create_List_H(LinkedList head, int n);
LinkedList Create_List_R(LinkedList head, int n);
Status GetValueByIndex(LinkedList L, int pos, ElemType *e);
LinkedList GetNodeByValue(LinkedList L, ElemType e);
Status Insert_LL(LinkedList L, int pos, ElemType e);
Status DeleteByIndex_LL(LinkedList L, int pos, ElemType *e);
Status DeleteByValue1_LL(LinkedList L, ElemType x);
Status DeleteByValue2_LL(LinkedList L, ElemType x);
Status Delete_SameValue_LL(LinkedList L);
void PrintLL(LinkedList L);

#endif //_SingleLinkedList_H
